# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=clip
pkgver=4.0.0
pkgrel=0
pkgdesc="Video player and video collection manager"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/maui/clip"
license="GPL-3.0-or-later"
depends="qt5-qtbase-sqlite"
makedepends="
	extra-cmake-modules
	ffmpeg-dev
	kcoreaddons-dev
	ki18n-dev
	mauikit-dev
	mauikit-filebrowsing-dev
	mpv-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtmultimedia-dev
	samurai
	taglib-dev
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/clip.git"
source="https://download.kde.org/stable/maui/clip/$pkgver/maui-clip-$pkgver.tar.xz
	0001-clip-taglib-1.13.patch
	"
options="!check" # No tests
builddir="$srcdir/maui-$pkgname-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
90ee094e76fad2553964f0ad4dd80a104a91fcbd3e26445c0d89cf43b86f2b495cf2595d5f584b6f6431dea045ad7022f697effd78ea47af8bfdc14aa9ebb140  maui-clip-4.0.0.tar.xz
cab95546e477aba307b04bd8443c916019cd916f738ad642f7beb7b6c05cfc7847fe4068759980d9ef86d4d1ba08fda9debe32a369006999046dcaf3419c7001  0001-clip-taglib-1.13.patch
"
